Method, apparatus, and system for obtaining electronic layout applied to photovoltaic array

ABSTRACT

This application discloses a method, an apparatus, and a system for obtaining electronic layout applied to photovoltaic array in the field of equipment installation management. According to the method, the electronic device identifies each first area in a target picture to obtain position information and a module identifier of at least one photovoltaic module in each first area, and may directly obtain an electronic layout based on the position information and the module identifier of each photovoltaic module. In this way, a product identifier of each converter does not need to be manually obtained, and a photovoltaic module does not need to be manually added to the electronic layout. This reduces labor time consumption and improves efficiency of obtaining the electronic layout.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2019/120692, filed on Nov. 25, 2019, which claims priority toChinese Patent Application No. 201910161773.0, filed on Mar. 4, 2019 andChinese Patent Application No. 201910425599.6, filed on May 21, 2019.All of the aforementioned patent applications are hereby incorporated byreference in their entireties.

TECHNICAL FIELD

This application relates to the field of device mounting management, andin particular, to a method, an apparatus, and a system for obtaining anelectronic layout applied to a photovoltaic array, an electronic device,and a computer storage medium.

BACKGROUND

With the advancement of technologies, photovoltaic power generationsystems are more and more widely applied to people's life, such as asolar street lamp, a solar water heater, and a photovoltaic station. Toresolve a problem of series-parallel connection of photovoltaic modulesin the photovoltaic power generation system, a converter is usuallymounted below each photovoltaic module in a photovoltaic array. When anyconverter in the photovoltaic power generation system fails, throughreporting of the photovoltaic power generation system, a skilled personmay search, by using a product serial number of the faulty converter, anelectronic layout of the photovoltaic array for a photovoltaic modulebound to the product serial number, so that the skilled person onlyneeds to open the found photovoltaic module to find the faultyconverter.

Currently, an electronic layout may be obtained in the followingprocesses. A paper layout that is of a photovoltaic array and thatincludes a 6×10 table is prepared, each cell in the table represents onephotovoltaic module, and a position of each cell in the table is aposition of a photovoltaic module corresponding to the cell in thephotovoltaic array. For example, a photovoltaic module in the first rowand the first column in the photovoltaic array corresponds to a cell inthe first row and the first column in the table. When mounting aconverter, the skilled person records a physical position of theconverter in the paper layout. For example, a converter 1 is mountedbelow a photovoltaic module 1 in the first row and the first column inthe photovoltaic array, and after the mounting of the converter 1 iscompleted, the skilled person removes a two-dimensional code 1 thatstores a product serial number and that is on the converter 1, andpastes the removed two-dimensional code 1 on a cell 1A corresponding tothe photovoltaic module 1. When no converter is mounted below aphotovoltaic module, a small box in a center of a cell corresponding tothe photovoltaic module is painted black to indicate that no converteris mounted below the photovoltaic module. Therefore, the paper layoutmay record whether a converter is mounted below each photovoltaic modulein the photovoltaic array. Application (APP) software is used tomanually draw an electronic layout. Based on the paper layout, theskilled person adds a photovoltaic module to the electronic layout, andmanually scans a two-dimensional code pasted in the paper layout toobtain a product serial number of a converter. Then, the skilled personbinds the obtained product serial number of the converter to thecorresponding photovoltaic module in the electronic layout. After addingof all photovoltaic modules in the paper layout is completed and bindingof product serial numbers on all two-dimensional codes to correspondingphotovoltaic modules is completed, the skilled person may obtain theelectronic layout of the photovoltaic array.

During the obtaining of the electronic layout, the skilled person needsto manually scan two-dimensional codes in the paper layout one by one toobtain a product serial number of a converter stored in eachtwo-dimensional code, and also needs to manually bind each productserial number to a corresponding photovoltaic module in the electroniclayout. Consequently, a relatively long labor time is consumed, andefficiency of obtaining the electronic layout is relatively low.

SUMMARY

Embodiments of this application provide a method, an apparatus, and asystem for obtaining an electronic layout applied to a photovoltaicarray, to resolve a problem of low obtaining efficiency in a process ofobtaining an electronic layout applied to a photovoltaic array. Thetechnical solutions are as follows:

According to a first aspect, a method for obtaining an electronic layoutapplied to a photovoltaic array is provided, and the method is appliedto an electronic device and includes:

-   -   obtaining, by the electronic device, a target picture, where the        target picture includes at least one first area, and the first        area is used to indicate position information and a module        identifier of at least one photovoltaic module in a photovoltaic        array, where the position information is used to indicate a        relative position of the photovoltaic module in the photovoltaic        array, and the module identifier includes a first-type module        identifier and a second-type module identifier, where the        first-type module identifier is used to indicate that a        converter is mounted below the photovoltaic module, and the        second-type module identifier is used to indicate that no        converter is mounted below the photovoltaic module;    -   identifying, by the electronic device, each first area in the        target picture to obtain position information and a module        identifier of at least one photovoltaic module in each first        area; and    -   obtaining, by the electronic device, an electronic layout of the        photovoltaic array based on the position information and the        module identifier of the at least one photovoltaic module in        each first area.

In an embodiment, the identifying, by the electronic device, each firstarea in the target picture to obtain position information and a moduleidentifier of at least one photovoltaic module in each first areaincludes:

-   -   detecting, by the electronic device, a position of each first        area in the target picture to obtain coordinate information of        the at least one photovoltaic module in each first area in the        target picture;    -   using, by the electronic device, the coordinate information of        the at least one photovoltaic module in each first area as the        position information of the at least one photovoltaic module in        the first area; and    -   performing, by the electronic device, identification at a preset        position of the at least one photovoltaic module in each first        area to obtain the module identifier of the at least one        photovoltaic module in each first area.

In an embodiment, the obtaining, by the electronic device, an electroniclayout of the photovoltaic array based on the position information andthe module identifier of the at least one photovoltaic module in eachfirst area includes:

-   -   obtaining, by the electronic device, a result list based on the        position information and the module identifier of the at least        one photovoltaic module in each first area;    -   adding, by the electronic device, one virtual module at a        corresponding position in a template of the electronic layout        based on each piece of position information in the result list,        where the virtual module corresponds to one photovoltaic module        in the photovoltaic array; and    -   binding, by the electronic device, each product identifier in        the result list to at least one corresponding virtual module in        the template of the electronic layout to obtain the electronic        layout of the photovoltaic array.

Based on the foregoing possible implementation, a product identifier ofeach converter does not need to be manually obtained, and a photovoltaicmodule does not need to be manually added to the electronic layout,thereby reducing labor time consumption and improving efficiency ofobtaining the electronic layout.

In an embodiment, the obtaining, by the electronic device, a result listbased on the position information and the module identifier of the atleast one photovoltaic module in each first area includes:

-   -   when a module identifier of any photovoltaic module in any first        area is a first-type module identifier, parsing, by the        electronic device, the module identifier to obtain a product        identifier indicated by the module identifier, and    -   associating, by the electronic device, the product identifier        with position information of at least one photovoltaic module in        the first area and storing the product identifier and the        position information of the at least one photovoltaic module in        the first area in the result list; and    -   when the module identifier of the any photovoltaic module in the        any first area is a second-type module identifier, outputting,        by the electronic device, a null identifier, and    -   associating, by the electronic device, the null identifier with        position information of the module identifier and storing the        null identifier and the position information of the module        identifier in the result list.

Based on the foregoing possible implementation, the electronic deviceobtains the electronic layout based on data in the list, so that theposition information of the at least one photovoltaic module in thefirst area identified by the electronic device corresponds to theproduct identifier. When the product identifier is being bound, ato-be-bound virtual module may be determined based on the correspondencebetween the product identifier and the position information in the listwithout a need to determine the correspondence between the productidentifier and the position information from the target picture.

In an embodiment, the obtaining, by the electronic device, an electroniclayout of the photovoltaic array based on the position information andthe module identifier of the at least one photovoltaic module in eachfirst area includes:

-   -   when position information of at least one photovoltaic module in        one first area is obtained, adding, by the electronic device, at        least one virtual module to a template of the electronic layout        of the photovoltaic array, where the virtual module corresponds        to one photovoltaic module in the photovoltaic array;    -   when any module identifier that is in the first area and that is        a first-type module identifier is obtained, parsing, by the        electronic device, the module identifier to obtain a product        identifier; and    -   binding, by the electronic device, the product identifier to the        at least one virtual module corresponding to the at least one        photovoltaic module in the first area, to obtain the electronic        layout of the photovoltaic array.

Based on the foregoing possible implementation, the electronic devicemay draw the electronic layout while identifying the first area in thetarget picture, thereby improving efficiency of obtaining the electroniclayout.

In an embodiment, the obtaining, by the electronic device, a targetpicture includes:

-   -   obtaining, by the electronic device, the target picture by        photographing or scanning a paper layout, where the paper layout        includes at least one area, and at least one module identifier        is marked in each area.

In an embodiment, the method further includes:

-   -   storing, by the electronic device, the electronic layout of the        photovoltaic array in a plurality of devices in a photovoltaic        power generation system, where the plurality of devices in the        photovoltaic power generation system support data        synchronization and backup.

Based on the foregoing possible implementation, the electronic layoutobtained by the electronic device may be stored in the plurality ofdevices in the photovoltaic power generation system, and the pluralityof devices can support data synchronization and backup, thereby avoidinga loss of the electronic layout.

According to a second aspect, an apparatus for obtaining an electroniclayout applied to a photovoltaic array is provided, to perform theforegoing method for obtaining an electronic layout applied to aphotovoltaic array. The apparatus for obtaining an electronic layoutincludes a function module for performing the foregoing method forobtaining an electronic layout applied to a photovoltaic array providedin any one of the first aspect and the optional manners of the firstaspect.

According to a third aspect, a system for obtaining an electronic layoutapplied to a photovoltaic array is provided, and the system includes aphotovoltaic module, a converter, and an electronic device, and is usedto perform the foregoing method for obtaining an electronic layoutapplied to a photovoltaic array. The system for obtaining an electroniclayout applied to a photovoltaic array includes a function module forperforming the foregoing method for obtaining an electronic layoutapplied to a photovoltaic array provided in any one of the first aspectand the optional manners of the first aspect.

According to a fourth aspect, an electronic device is provided, and theelectronic device includes a processor and a memory. The memory storesat least one instruction, and the instruction is loaded and executed bythe processor to implement the operations of the foregoing method forobtaining an electronic layout applied to a photovoltaic array.

According to a fifth aspect, a computer readable storage medium isprovided. The storage medium stores at least one instruction, and theinstruction is loaded and executed by a processor to implement theoperations of the foregoing method for obtaining an electronic layoutapplied to a photovoltaic array.

BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of thisapplication more clearly, the following briefly describes theaccompanying drawings required for describing the embodiments.Apparently, the accompanying drawings in the following description showmerely some embodiments of this application, and a person of ordinaryskill in the art may still derive other drawings from these accompanyingdrawings without creative efforts.

FIG. 1 is a schematic diagram of an implementation environment accordingto an embodiment of this application;

FIG. 2 is a schematic structural diagram of an electronic deviceaccording to an embodiment of this application;

FIG. 3 is a flowchart of a method for obtaining an electronic layoutapplied to a photovoltaic array according to an embodiment of thisapplication;

FIG. 4 is a schematic diagram of a paper layout according to anembodiment of this application;

FIG. 5 is a schematic diagram of a paper layout according to anembodiment of this application;

FIG. 6 is a schematic diagram of a paper layout according to anembodiment of this application;

FIG. 7 is a schematic diagram of generating a target picture accordingto an embodiment of this application;

FIG. 7 a is a schematic diagram of generating a target picture accordingto an embodiment of this application;

FIG. 8 is a schematic diagram of generating a target picture accordingto an embodiment of this application;

FIG. 8 a is a schematic diagram of generating a target picture accordingto an embodiment of this application;

FIG. 9 is a schematic diagram of generating a target picture accordingto an embodiment of this application;

FIG. 9 a is a schematic diagram of generating a target picture accordingto an embodiment of this application;

FIG. 10 is a schematic diagram of obtaining an electronic layout appliedto a photovoltaic array according to an embodiment of this application;

FIG. 10 a is a schematic diagram of obtaining an electronic layoutapplied to a photovoltaic array according to an embodiment of thisapplication;

FIG. 11 is a schematic diagram of obtaining an electronic layout appliedto a photovoltaic array according to an embodiment of this application;

FIG. 11 a is a schematic diagram of obtaining an electronic layoutapplied to a photovoltaic array according to an embodiment of thisapplication;

FIG. 12 is a schematic diagram of obtaining an electronic layout appliedto a photovoltaic array according to an embodiment of this application;

FIG. 12 a is a schematic diagram of obtaining an electronic layoutapplied to a photovoltaic array according to an embodiment of thisapplication;

FIG. 13 is a flowchart of a method for obtaining an electronic layoutapplied to a photovoltaic array according to an embodiment of thisapplication;

FIG. 14 is a flowchart of a method for obtaining an electronic layoutapplied to a photovoltaic array according to an embodiment of thisapplication;

FIG. 15 is a schematic diagram of an application scenario according toan embodiment of this application; and

FIG. 16 is a schematic diagram of an apparatus for obtaining anelectronic layout applied to a photovoltaic array according to anembodiment of this application.

DESCRIPTION OF EMBODIMENTS

To make the objectives, technical solutions, and advantages of thisapplication clearer, the following further describes the implementationsof this application in detail with reference to the accompanyingdrawings.

FIG. 1 is a schematic diagram of an implementation environment accordingto an embodiment of this application. Referring to FIG. 1 , theimplementation environment includes a photovoltaic power generationsystem and an electronic device.

The photovoltaic power generation system is a power generation systemthat converts solar energy into electric energy. The photovoltaic powergeneration system includes a photovoltaic module, a guide rail bracket,and a converter. The photovoltaic module is configured to convert solarenergy into a direct current. The direct current may be directlyconnected to a public power grid after being converted by a grid-tiedinverter into an alternating current that meets a requirement of a mainspower grid, to supply power to a user. To enable the user to obtain arelatively high output voltage or output current, a plurality ofphotovoltaic modules may be connected in series and in parallel to forma photovoltaic array. The guide rail bracket is mounted below thephotovoltaic module to support the photovoltaic module. The converter isconfigured to resolve a mismatch problem of series-parallel connectionof the photovoltaic modules, so that each photovoltaic module can beconnected to one converter. The converter may be a photovoltaicconverter that has an independent maximum power point tracking (maximumMPPT) function. In an actual mounting process, a converter is usuallymounted on the guide rail bracket. When a photovoltaic module connectedto the converter is mounted on the guide rail bracket, the converter ishidden below the photovoltaic module. The photovoltaic power generationsystem may further include devices such as an inverter and a networkmanagement device, and the devices in the photovoltaic power generationsystem support synchronous data storage.

To obtain an electronic layout, this embodiment of this applicationprovides a paper layout to record a position of each photovoltaic modulein the photovoltaic power generation system in the photovoltaic arrayand a mounting status of a converter. A table may be drawn in the paperlayout, and each cell in the table is used to represent at least onephotovoltaic module.

The electronic device is configured to: generate a target picture byusing the paper layout, or import a target picture generated by anotherelectronic device by using the paper layout, automatically generate anelectronic layout based on the target picture, and store the electroniclayout in the devices in the photovoltaic power generation system.Target APP software may be installed in the electronic device, and thetarget APP software is used to identify the target picture and generatethe electronic layout based on an identification result.

The electronic layout is used to record a position of each photovoltaicmodule in the photovoltaic power generation system in the photovoltaicarray and a mounting status of a convert. The electronic layout may bestored in a plurality of devices in the photovoltaic power generationsystem, for example, the electronic layout is stored in the inverter,the converter, and the network management device in the photovoltaicpower generation system, and the electronic layout supports mutualsynchronization and backup among the inverter, the converter, and thenetwork management device, thereby ensuring that the electronic layoutis not lost in a single-device failure scenario. For example, if theinverter fails, after a new inverter is mounted, the new invertersupports synchronization of the electronic layout from the converter orthe network management device.

FIG. 2 is a schematic structural diagram of an electronic deviceaccording to an embodiment of this application. An electronic device 200may vary greatly due to a difference in configuration or performance,and may include one or more central processing units (CPU) 201 and oneor more memories 202. The memory 202 stores at least one instruction,and the at least one instruction is loaded and executed by the CPU 201to implement the method provided in the following method embodiments.Certainly, the electronic device 200 may further have components such asa wired or wireless network interface, a keyboard, and an input/outputinterface, to perform input/output. The electronic device 200 mayfurther include another component for implementing a device function.Details are not described herein.

In an example embodiment, a computer readable storage medium is furtherprovided, for example, a memory including an instruction, and theinstruction may be executed by a processor in a terminal to complete amethod for obtaining an electronic layout applied to a photovoltaicarray in the following embodiment. For example, the computer readablestorage medium may be a read-only memory (ROM), a random access memory(RAM), a compact disc read-only memory (CD-ROM), a tape, a floppy disk,or an optical data storage device.

The implementation environment of obtaining the electronic layout isdescribed above. Further, to reflect a process of obtaining theelectronic layout, a specific embodiment is used herein for description.FIG. 3 is a flowchart of a method for obtaining an electronic layoutapplied to a photovoltaic array according to an embodiment of thisapplication. A procedure of the method provided in this embodiment ofthis application includes the following operations.

301. An electronic device obtains a target picture, where the targetpicture includes at least one first area, and each first area is used toindicate position information and a module identifier of at least onephotovoltaic module in a photovoltaic array.

In a possible manner, the electronic device obtains the target pictureby photographing or scanning a paper layout.

In another possible manner, the target picture is obtained byphotographing or scanning a paper layout by using another electronicdevice, and then is imported into the electronic device.

This embodiment of this application is not limited to obtaining of thetarget picture through photographing or scanning, and the target picturemay be obtained in another manner.

In another embodiment of this application, the target picture is not aphysical picture in a strict sense, but an information carrier forcarrying position information and module identifier information.

The target picture is a picture version of the paper layout. The paperlayout records a position of each photovoltaic module in thephotovoltaic array and a mounted converter in the photovoltaic array.For the paper layout, the paper layout includes at least one area. Atleast one module identifier is marked in each area, and each moduleidentifier corresponds to at least one photovoltaic module in thephotovoltaic array. An area identifier may be further marked in eacharea, and different area identifiers are used to indicate thatquantities of photovoltaic modules indicated by areas are different. Forexample, FIG. 4 is a schematic diagram of a paper layout according to anembodiment of this application. An area identifier in an area 1 in FIG.4 is a dashed-line box, and the dashed-line box may indicate that thearea 1 indicates one photovoltaic module. For another example, FIG. 5 isa schematic diagram of a paper layout according to an embodiment of thisapplication. An area identifier in an area 2 in FIG. 5 is a dashed-linecircle, and the dashed-line circle may indicate that the area indicatestwo photovoltaic modules. Certainly, there may be at least one areaidentifier in each first area, and each area identifier may represent atleast one photovoltaic module. For example, FIG. 6 is a schematicdiagram of a paper layout according to an embodiment of thisapplication. There are two area identifiers composed of two dashed-lineboxes in an area 3 in FIG. 6 , each area identifier may represent onephotovoltaic module, and the area 3 indicates two parallel photovoltaicmodules in a photovoltaic array. A left area identifier in the area 3 isused to indicate a left photovoltaic module in the two parallelphotovoltaic modules, and a right area identifier in the area 3 is usedto indicate a right photovoltaic module in the two parallel photovoltaicmodules.

It should be noted that area identifiers in each area in the paperlayout may be area identifiers of a same type, that is, each area in thepaper layout indicates a same quantity of photovoltaic modules. Areaidentifiers in each area in the paper layout may be area identifiers ofdifferent types, that is, each area in the paper layout indicatesdifferent quantities of photovoltaic modules.

A table is drawn in the paper layout, and the entire table representsone photovoltaic array. Each cell in the table is an area in the paperlayout, that is, each cell represents at least one photovoltaic modulein the photovoltaic array. Each row in the table has one index, forexample, 1, 2, 3 . . . , and each column also has one index, forexample, A, B, C . . . . In this case, any cell in the table may berepresented by using a row index and a column index. For example, anarea in the first row and the first column in FIG. 4 may be representedas A1. The area A1 represents at least one photovoltaic module in thefirst row and the first column in the photovoltaic array.

The module identifier includes a first-type module identifier and asecond-type module identifier. The first-type module identifier is usedto indicate that a converter is mounted below the photovoltaic module,and the second-type module identifier is used to indicate that noconverter is mounted below the photovoltaic module. A carrier of thefirst-type module identifier may be a two-dimensional code of aconverter, the two-dimensional code is used to indicate a productidentifier of the converter, and the product identifier may beidentifier information such as a product serial number of the converter.The second-type module identifier may be any identifier that can beidentified by software except the first-type module identifier, forexample, a small black box.

A carrier of each module identifier in this embodiment of thisapplication is not limited to a two-dimensional code, and may be aninformation carrier or an identifier symbol in another form such as aone-dimensional code.

In some embodiments of this application, the module identifier includesa first-type module identifier or a second-type module identifier, thatis, module identifiers are all first-type module identifiers, or may beall second-type module identifiers, or may be a combination of thefirst-type module identifier and the second-type module identifier.

When mounting a photovoltaic array, a skilled person may record amounting position of each converter in the photovoltaic array by usingthe paper layout. When a converter is mounted below a photovoltaicmodule, before mounting the photovoltaic module, the skilled person mayremove, from the converter, a two-dimensional code sticker carrying atwo-dimensional code of the converter, and the sticker may furtherdisplay a product identifier of the converter. The skilled person pastesthe sticker in a corresponding area in the paper layout. For example,each first area in the paper layout indicates one module identifier. Aconverter 1 is mounted below a photovoltaic module 3 in the second rowand the second column in the photovoltaic array, and after the mountingof the converter 1 is completed, the skilled person removes atwo-dimensional code sticker 1 on the converter 1, and pastes theremoved two-dimensional code sticker 1 in an area B2 corresponding tothe photovoltaic module 3. If no converter is mounted below aphotovoltaic module, the skilled person paints a small box black in acorresponding area in the paper layout. After the mounting of thephotovoltaic array is completed, the skilled person may complete thepaper layout. Referring to FIG. 7 , FIG. 7 a , and FIG. 4 , FIG. 7 is aschematic diagram of generating a target picture according to anembodiment of this application. After completing mounting of aphotovoltaic array, the skilled person may complete a paper layout basedon a paper layout 1 in FIG. 4 to obtain a paper layout 1 in FIG. 7 . Itcan be learned from the paper layout 1 in FIG. 7 that converters aremounted below photovoltaic modules corresponding to areas B2, D2, C3,and D4, and no converter is mounted below photovoltaic modulescorresponding to areas A2-4, B3-4, C1, C4, D5, and E1-4. FIG. 7 a isanother schematic diagram of generating a target picture according to anembodiment of this application. After completing mounting of aphotovoltaic array, the skilled person may complete drawing of a paperlayout based on the paper layout 1 in FIG. 4 to obtain a paper layout 1a in FIG. 7 a . It can be learned from the paper layout 1 a in FIG. 7 athat converters are mounted below photovoltaic modules corresponding toareas A2-4, B2-4, C2-4, D2-4, and E1-4.

When an area identifier is used to indicate a plurality of photovoltaicmodules in each first area in the paper layout, the skilled person maymark a module identifier at a preset position of at least onephotovoltaic module in each first area. A preset position of eachphotovoltaic module may be a position of an area identifiercorresponding to the photovoltaic module.

In an embodiment, when one area identifier is used to indicate aplurality of photovoltaic modules in each area in the paper layout, if aconverter is mounted below any photovoltaic module indicated by anyarea, the skilled person pastes a module identifier on the converter inthe area. If no converter is mounted below all photovoltaic modulesindicated by any area, the skilled person paints an area identifierblack in the area. Referring to FIG. 8 , FIG. 8 a , and FIG. 5 , FIG. 8is a schematic diagram of generating a target picture according to anembodiment of this application. After completing mounting of aphotovoltaic array, the skilled person may complete drawing of a paperlayout based on a paper layout 2 in FIG. 5 to obtain a paper layout 2 inFIG. 8 . It can be learned from the paper layout 2 in FIG. 8 thatconverters are mounted below photovoltaic modules corresponding to areasB2, D2, C3, and D4, and no converter is mounted below photovoltaicmodules corresponding to areas A2-4, B3-4, C1, C4, D5, and E1-4. FIG. 8a is another schematic diagram of generating a target picture accordingto an embodiment of this application. After completing mounting of aphotovoltaic array, the skilled person may complete drawing of a paperlayout based on the paper layout 2 in FIG. 5 to obtain a paper layout 2a in FIG. 8 a . It can be learned from the paper layout 2 a in FIG. 8 athat converters are mounted below photovoltaic modules corresponding toareas A2-4, B2-4, C2-4, D2-4, and E1-4.

In an embodiment, when a plurality of area identifiers are used toindicate a plurality of photovoltaic modules in each area in the paperlayout, if a converter is mounted below any photovoltaic moduleindicated by any area, the skilled person pastes a module identifier onthe converter at a preset position of the photovoltaic module in thearea. If no converter is mounted below any photovoltaic module indicatedby any area, the skilled person paints an area identifier correspondingto the photovoltaic module black in the area. Referring to FIG. 9 , FIG.9 a , and FIG. 6 , FIG. 9 is a schematic diagram of generating a targetpicture according to an embodiment of this application. After completingmounting of a photovoltaic array, the skilled person may completedrawing of a paper layout based on a paper layout 3 in FIG. 6 to obtaina paper layout 3 in FIG. 9 . It can be learned from the paper layout 3in FIG. 9 that for two photovoltaic modules indicated in an area A2, ifa left area identifier in the area A2 is painted black, the black areaidentifier is used to indicate that no converter is mounted below aphotovoltaic module indicated by the area identifier, and if a moduleidentifier is pasted on a right area identifier in the area A2, the areaidentifier pasted with the module identifier is used to indicate that aconverter is mounted below a photovoltaic module indicated by the areaidentifier. FIG. 9 a is a schematic diagram of generating a targetpicture according to an embodiment of this application. After completingmounting of a photovoltaic array, the skilled person may completedrawing of a paper layout based on the paper layout 3 in FIG. 6 toobtain a paper layout 3 a in FIG. 9 a . It can be learned from the paperlayout 3 a in FIG. 9 a that for two photovoltaic modules indicated in anarea A2, if module identifiers are pasted on both a left area identifierand a right area identifier in the area A2, the area identifier pastedwith the module identifier is used to indicate that a converter ismounted below a photovoltaic module indicated by the area identifier.

For any target picture, the target picture may be used to reflect eachpart in a paper layout. When the paper layout represents at least onephotovoltaic array, the target picture may include at least one firstarea array of N×M, each first area array corresponds to one photovoltaicarray, and each first area in each first area array corresponds to atleast one photovoltaic module in one photovoltaic array, where both Nand M are positive integers greater than 0. A quantity of area arrays inthe target picture and a layout of an area array are not limited in thisembodiment of this application. This embodiment of this applicationillustrates the following operations by using an example in which thereis one area array of a photovoltaic array in the target picture.

The electronic device may obtain the target picture of the paper layoutthrough target APP software. In an embodiment, the target APP softwareis displayed on a display interface of the electronic device, and theskilled person issues an instruction of opening the target APP softwareto the electronic device through the target APP software on the displayinterface of the electronic device. When the electronic device receivesthe instruction, the electronic device displays a user interface in thetarget APP software. When the electronic device receives a photographinginstruction, the target APP software of the electronic device enables aphotographing function. When the paper layout is within a photographingrange of the electronic device, the electronic device may photograph thepaper layout through the photographing function of the target APPsoftware to obtain the target picture. FIG. 10 is a schematic diagram ofobtaining an electronic layout applied to a photovoltaic array accordingto an embodiment of this application. A user interface of an electronicdevice in FIG. 10 displays a “Gallery” icon and a “Camera” icon. A usermay click the “Camera” icon, and the electronic device receives aphotographing instruction, thereby photographing a paper layout toobtain a target picture. Certainly, when the target picture of the paperlayout is stored in the electronic device, the electronic device maydirectly obtain the stored target picture of the paper layout. Stilltaking FIG. 10 as an example, the user clicks the “Gallery” icon, andthe electronic device displays pictures stored in the electronic deviceto the user. The user searches the displayed pictures for the targetpicture of the paper layout, and when the electronic device clicks thetarget picture, target software in the electronic device may obtain thetarget picture.

Alternatively, when the electronic device receives a scanninginstruction, the target APP software of the electronic device enables ascanning function. When the paper layout is within a scanning range ofthe electronic device, the electronic device may scan the paper layoutthrough the scanning function of the target APP software to obtain thetarget picture 302. The electronic device identifies each first area inthe target picture to obtain position information and a moduleidentifier of at least one photovoltaic module in each first area.

The module identifier in each first area in the target picture is amodule identifier marked in each area in the paper layout. Whenidentifying each first area in the target picture, the electronic devicemay identify a module identifier of at least one photovoltaic module ineach area in the paper layout.

Position information of each photovoltaic module is informationindicating a position of each photovoltaic module in the first area inthe target picture, and the position information of each photovoltaicmodule may be coordinate information of each photovoltaic module in thefirst area in the target picture.

A process of identifying the first area in the target picture by theelectronic device may include a process of detecting a position of eachfirst area and a process of obtaining the module identifier in eachfirst area. In an embodiment, operation 302 may be implemented by aprocess shown in operations 302A to 302C described below.

Operation 302A: The electronic device detects a position of each firstarea in the target picture to obtain coordinate information of the atleast one photovoltaic module in each first area in the target picture.

Coordinate information of a first area is a coordinate value of at leastone photovoltaic module in the first area in the target picture. Theelectronic device may determine the position of each first area in thetarget picture through position detection. Then, the electronic devicegenerates a coordinate value based on the position of each first area inthe target picture, and then the electronic device determines thecoordinate information of the at least one photovoltaic module in thefirst area based on a preset position of each photovoltaic module ineach first area.

The electronic device may determine the position of each first area inthe target picture through position detection in any one of thefollowing manner 1, manner 2, and manner 3, but this is not to the threemanners.

Manner 1: The electronic device determines coordinate information ofeach first area by directly detecting a position index of each firstarea.

When a row index of each first area is displayed at a first targetposition in the target picture and a column index of each first area isdisplayed at a second target position, the first electronic devicedetermines the coordinate information of each first area by detectingthe row index and the column index of each first area. The first targetposition is a column header or a column tail of each column, and thefirst target position is a row header and a row tail of each row.

In an embodiment, when detecting any first area, the electronic devicedetects a row header of a row in which the first area is located, toobtain a row index of the first area, and the electronic device detectsa column header of a column in which the first area is located, toobtain a column index of the first area. The electronic device combinesthe row index and the column index of the first area to obtaincoordinate information of the first area.

Still taking FIG. 5 as an example, when the electronic device detects afirst area at a position in the first row and the fifth column in thetarget picture, the electronic device detects that a row index displayedat a row header of the first row is 1, and the electronic device detectsthat a column index displayed at a column header of the fifth column isE. In this case, the electronic device combines the detected row indexand the detected column index to obtain E1, and uses E1 as coordinateinformation of the first area.

Manner 2: The electronic device uses a reference point as an origin of acoordinate axis, and determines coordinate information of each firstarea by detecting a position of each first area relative to thereference point.

The reference point may be any point in the target picture. For example,a point in an upper left corner of a first area at a position in thefirst row and the first column in the target picture is the referencepoint. The relative position includes a horizontal relative position anda longitudinal relative position. A horizontal relative position of anyfirst area is a quantity of first areas between the first area on ahorizontal axis of the coordinate axis and the reference point plus 1,and a longitudinal relative position of any first area is a quantity offirst areas between the first area on a longitudinal axis of thecoordinate axis and the reference point plus 1. For example, if aquantity of first areas between the first area in the first row and thefirst column in the target picture on the horizontal axis of thecoordinate axis and the reference point is 0, a horizontal relativeposition of the first area is 0+1=1. If a quantity of first areasbetween the first area in the first row and the first column in thetarget picture on the longitudinal axis of the coordinate axis and thereference point is 0, a longitudinal relative position of the first areais 0+1=1.

In an embodiment, when the electronic device detects that any first areais an X^(th) first area on the horizontal axis of the coordinate axis, ahorizontal relative position of the first area is X. When the electronicdevice detects that the first area is a Y^(th) first area on thelongitudinal axis of the coordinate axis, a longitudinal relativeposition of the first area is Y. The electronic device combines thehorizontal relative position X and the longitudinal relative position Yof the first area to obtain a relative position (X, Y) of the firstarea, and uses the relative position (X, Y) as coordinate information ofthe first area.

Manner 3: The electronic device determines a coordinate axis based on atleast three target identifiers in the target picture, and the electronicdevice determines coordinate information of each first area based on adistance of an area identifier in each first area from the coordinateaxis.

The at least three target identifiers are identifiers displayed in thepaper layout, and the at least three target identifiers are marked to bedistributed around the paper layout, for example, small boxes around thepaper layout in FIG. 4 . In this case, when the electronic devicephotographs the paper layout, corresponding target identifiers are alsodisplayed around the obtained target picture. After detecting the atleast three target identifiers, the electronic device may determine arange of an entire paper layout based on the at least three targetidentifiers. When the electronic device detects distribution of threetarget identifiers distributed in a right angle in the target picture,the three target identifiers include a first target identifier, a secondtarget identifier, and a third target identifier. The electronic devicemay use a center of the first target identifier as an origin of thecoordinate axis, use a connection line between a center of the secondtarget identifier and the center of the first target identifier as ahorizontal axis of the coordinate axis, and use a connection linebetween a center of the third target identifier and the center of thefirst target identifier as a longitudinal axis of the coordinate axis,so that the electronic device can determine the coordinate axis. Acoordinate plane in which the coordinate axis is located may include atleast one first area in the target picture.

In an embodiment, when the electronic device detects that any areaidentifier is an X^(th) area identifier in a direction of the horizontalaxis of the coordinate axis, a horizontal coordinate of the areaidentifier is X. When the electronic device detects that the areaidentifier is a Y^(th) area identifier in a direction of thelongitudinal axis of the coordinate axis, a longitudinal coordinate ofthe area identifier is Y. In this case, coordinate information of thearea identifier is (X, Y). The electronic device may use the coordinateinformation (X, Y) of the area identifier as coordinate information of afirst area in which the area identifier is located.

The coordinate information of the first area may be determined in anyone of the foregoing three manners. When there is one photovoltaicmodule in the first area, the coordinate information of the first areamay be used as coordinate information of the photovoltaic module in thefirst area. When the first area indicates a plurality of photovoltaicmodules, the electronic device determines coordinate information of eachphotovoltaic module in the first area based on a preset position of eachphotovoltaic module in the first area. In an embodiment, when a presetposition of any photovoltaic module in the first area is Z presetpositions, and the coordinate information of the first area is (X, Y),(X, Y, Z) may be used as coordinate information of the photovoltaicmodule.

When there are a plurality of area identifiers in each first area, apreset position of each photovoltaic module in the first area may be aposition of an area identifier of each photovoltaic module in the firstarea. The electronic device may identify the area identifiers based onan order of the area identifiers in the first area, to obtain coordinateinformation of each photovoltaic module indicated by the first area. Forexample, there are two area identifiers in a first area A2 in FIG. 9 , aleft area identifier is painted black, and a right area identifierdisplays a module identifier. When the electronic device identifies thefirst area identifier on the left of the first area A2 from left toright, coordinate information of a photovoltaic module indicated by thearea identifier is (A, 2, 1). Then, the electronic device continues toperform identification rightwards in the first area A2. When the secondarea identifier is identified, coordinate information of a photovoltaicmodule indicated by the area identifier is (A, 2, 2).

It should be noted that an order in which the electronic deviceidentifies area identifiers in a first area is not limited in thisembodiment of this application.

Operation 302B: The electronic device uses the coordinate information ofthe at least one photovoltaic module in each first area as the positioninformation of the at least one photovoltaic module in the first area.

Still taking the example in operation 302A as an example, the obtainedcoordinate information E1 is used as position information of aphotovoltaic module in the identified first area.

Operation 302C: The electronic device performs identification at apreset position of the at least one photovoltaic module in each firstarea to obtain at least one module identifier in each first area.

The preset position may be a central position of the first area oranother position in the first area. A quantity of preset positions inthe first area is the same as a quantity of photovoltaic modules in thefirst area. In other words, each preset position corresponds to onephotovoltaic module. The preset position is not limited in thisembodiment of this application. For example, when identifying atwo-dimensional code at a preset position of any area, the electronicdevice may use the two-dimensional code as a module identifier in thefirst area. When identifying a template character string at a presetposition of any area, the electronic device may use the target characterstring as a module identifier in the first area. Both thetwo-dimensional code and the character string are first-type moduleidentifiers. In this embodiment of this application, an example in whichthe first-type module identifier is a two-dimensional code is used fordescription.

It should be noted that the electronic device may first perform positiondetection on each first area, and then obtain a module identifier ineach first area. Alternatively, when the electronic device completesposition detection on one first area and obtaining of a moduleidentifier, the electronic device may then perform position detection ona next first area in the target picture and obtain a module identifier.Alternatively, the electronic device may simultaneously perform aposition detection operation and a module identifier obtaining operationon one first area.

303. The electronic device obtains an electronic layout of thephotovoltaic array based on the position information and the moduleidentifier of the at least one photovoltaic module in each first area.

The electronic layout includes a plurality of virtual modules, eachvirtual module corresponds to one photovoltaic module in thephotovoltaic array, and a position of each virtual module in theelectronic layout is a position of the corresponding photovoltaic modulein the photovoltaic array.

The virtual module is a preset module provided by the skilled person inadvance for drawing the electronic layout. The virtual module may be inany form, and the virtual module is not limited in this embodiment ofthis application.

The electronic device may implement operation 303 through either aprocess 1 or a process 2. The process 1 is a process in which theelectronic device obtains a result list based on the positioninformation and the module identifier of the at least one photovoltaicmodule in each first area, and then obtains the electronic layout basedon content in the result list. It can be learned that in the process 1,the electronic layout is not obtained based on a real-timeidentification result. The process 2 is a process of obtaining theelectronic layout based on position information and a module identifierthat are obtained through real-time identification.

For a further description of the process shown in the process 1, referto FIG. 13 . FIG. 13 is a flowchart of a method for obtaining anelectronic layout applied to a photovoltaic array according to anembodiment of this application. The method includes the followingoperations.

Operation 303A: When a module identifier of any photovoltaic module inany first area is a first-type module identifier, the electronic deviceparses the module identifier to obtain a product identifier indicated bythe module identifier.

The electronic device may detect the module identifier to determinewhether the detected module identifier is a first-type moduleidentifier. In an embodiment, the electronic device detects a moduleidentifier in a target area. When detecting that a module identifier inany first area is a first-type module identifier, the electronic deviceperforms operation 303. For example, the first-type module identifier isa two-dimensional code. When detecting that the module identifier in theany first area is a two-dimensional code, the electronic device parsesthe two-dimensional code to obtain a product serial number indicated bythe two-dimensional code.

Operation 303B: The electronic device associates the product identifierwith position information of at least one photovoltaic module in thefirst area and stores the product identifier and the positioninformation of the at least one photovoltaic module in the first area inthe result list.

The electronic device may store the product identifier and the positioninformation of each photovoltaic module in the first area in a same rowof the result list, so that the product identifier is associated withthe position information of the at least one photovoltaic module in thefirst area.

Operation 303C: When the module identifier of the any photovoltaicmodule in the any first area is a second-type module identifier, theelectronic device outputs a null identifier.

A manner of determining, by the electronic device, whether the moduleidentifier is a second-type module identifier is similar to a manner ofdetermining whether the module identifier is a first-type moduleidentifier. The manner of determining, by the electronic device, whetherthe module identifier is a second-type module identifier is notdescribed in this embodiment of this application.

The null identifier may be represented by any character string, forexample, NA, and is used to indicate that the module identifier cannotindicate a product serial number.

It should be noted that in an embodiment, when the module identifier ofthe any photovoltaic module in the any first area is a second-typemodule identifier, the electronic device does not output any result.

Operation 303D: The electronic device associates the null identifierwith position information of the photovoltaic module and stores the nullidentifier and the position information of the photovoltaic module inthe result list.

The electronic device may store the null identifier and the positioninformation of the photovoltaic module in a same row of the result list,so that the null identifier is associated with the position informationof the photovoltaic module.

It should be noted that a process shown in operations 303A to 303D is aprocess in which the electronic device obtains the result list based onthe position information and the module identifier of the at least onephotovoltaic module in each first area, and the null identifier and theproduct identifier obtained by the electronic device in operations 303Aand 303C may be used as a product description in the result list.

To further reflect each photovoltaic module in the photovoltaic arrayand a converter in the result list, the electronic device may add amodule description to the result list. In an embodiment, when the moduleidentifier of the any photovoltaic module in the any first area is afirst-type module identifier, a module description output by theelectronic device is “a photovoltaic module and a converter aremounted”. When the module identifier of the any photovoltaic module inthe any first area is a second-type module identifier, a moduledescription output by the electronic device is “a photovoltaic module ismounted but no converter is mounted”. When a module identifier in theany first area is a second-type module identifier, a module descriptionoutput by the electronic device is a “null identifier” or is empty, andthe electronic device associates the module description with positioninformation of the photovoltaic module and stores the module descriptionand position information of the photovoltaic module in the result list.

Taking FIG. 7 as an example, it can be learned from Table 1 that thereis no module identifier in a first area A1, that is, neither aphotovoltaic module nor a converter is mounted at a positioncorresponding to the first area A1 in the photovoltaic array. A moduleidentifier in a first area E1 is a second-type module identifier, thatis, a photovoltaic module is mounted at a position corresponding to thefirst area E1 in the photovoltaic array, but no converter is mounted. Amodule identifier in a first area B2 is a first-type module identifier,that is, a photovoltaic module and a converter are mounted at a positioncorresponding to the first area B2 in the photovoltaic array, and aproduct identifier of the mounted converter is XXXXXXXX.

TABLE 1 Sequence Position Product number information Module descriptiondescription 1 A1 NA NA 2 B1 NA NA . . . . . . . . . . . . 5 E1 Aphotovoltaic module is NA mounted but no converter is mounted. . . . . .. . . . . . . 12 B2 A photovoltaic module and a XXXXXXXX converter aremounted. . . . . . . . . . . . . 59 I6 NA NA 60 J6 NA NA

In an embodiment, the electronic device may not store information abouta first area having no module identifier in the result list, but storesonly information about a first area having a module identifier, therebyimproving efficiency of generating the result list and reducing memoryconsumption of the electronic device. Referring to Table 2, it can belearned that information about a first area having no module identifieris not stored in Table 2, but only information about a first area havinga module identifier is stored.

TABLE 2 Sequence Position Product number information Module descriptiondescription 1 E1 A photovoltaic module is NA mounted but no converter ismounted. 2 A2 A photovoltaic module is NA mounted but no converter ismounted. . . . . . . . . . . . . 5 D2 A photovoltaic module and XXXXXXXXa converter are mounted. . . . . . . . . . . . . 11 E3 A photovoltaicmodule is NA mounted but no converter is mounted. 12 A4 A photovoltaicmodule is NA mounted but no converter is mounted. . . . . . . . . . . .. 16 E4 A photovoltaic module is NA mounted but no converter is mounted.

Taking FIG. 7 a as an example, it can be learned from Table 1a thatthere is no module identifier in a first area A1, that is, neither aphotovoltaic module nor a converter is mounted at a positioncorresponding to the first area A1 in the photovoltaic array. Moduleidentifiers in first areas E1 and B2 are first-type module identifiers,that is, a photovoltaic module and a converter are mounted at a positioncorresponding to the first area E1 in the photovoltaic array, and aproduct identifier of the mounted converter is There is no second-typemodule identifier in the first area.

TABLE 1a Sequence Position Product number information Module descriptiondescription 1 A1 NA NA 2 B1 NA NA . . . . . . . . . . . . 5 E1 Aphotovoltaic module and a XXXXXXXX converter are mounted. . . . . . . .. . . . . 12 B2 A photovoltaic module and a XXXXXXXX converter aremounted. . . . . . . . . . . . . 59 I6 NA NA 60 J6 NA NA

In an embodiment, the electronic device may not store information abouta first area having no module identifier in the result list, but storesonly information about a first area having a module identifier, therebyimproving efficiency of generating the result list and reducing memoryconsumption of the electronic device. Referring to Table 2a, it can belearned that information about a first area having no module identifieris not stored in Table 2a, but only information about a first areahaving a module identifier is stored.

TABLE 2a Sequence Position Product number information Module descriptiondescription 1 E1 A photovoltaic module and a XXXXXXXX converter aremounted. 2 A2 A photovoltaic module and a XXXXXXXX converter aremounted. . . . . . . . . . . . . 5 D2 A photovoltaic module and aXXXXXXXX converter are mounted. . . . . . . . . . . . . 11 E3 Aphotovoltaic module and a XXXXXXXX converter are mounted. 12 A4 Aphotovoltaic module and a XXXXXXXX converter are mounted. . . . . . . .. . . . . 16 E4 A photovoltaic module and a XXXXXXXX converter aremounted.

Operation 303E: The electronic device adds one virtual module at acorresponding position in a template of the electronic layout based oneach piece of position information in the result list, where the virtualmodule corresponds to one photovoltaic module in the photovoltaic array.

The template of the electronic layout is a template provided by theskilled person in advance for drawing the electronic layout. Theelectronic device may draw the electronic layout on the template of theelectronic layout based on position information and a product identifierof the at least one photovoltaic module in each first area.

The electronic device may add a virtual module to the template of theelectronic layout based on position information read from the resultlist. In an embodiment, when the electronic device reads one piece ofposition information from the result list, the electronic device addsone virtual module at a corresponding position in the template of theelectronic layout.

Operation 303F: The electronic device binds each product identifier inthe result list to at least one corresponding virtual module in thetemplate of the electronic layout to obtain the electronic layout of thephotovoltaic array.

The at least one virtual module corresponds to at least one photovoltaicmodule in a first area in which the product identifier is located.

In an embodiment, when the electronic device reads one productidentifier from the result list, the electronic device performsoperation 303F. It should be noted that a virtual module is not bound toa null identifier, but is bound to only a product identifier. Forexample, if a product description of the electronic device in the firstrow in Table 2 is a null identifier NA, the electronic device does notneed to bind the null identifier NA to a corresponding virtual module.

The electronic device may bind a product identifier to a correspondingvirtual module in any one of the following manners 4 to 6.

Manner 4: The electronic device directly displays any product identifieron at least one corresponding virtual module.

Manner 5: The electronic device displays any product identifier on oneicon, and displays the icon on at least one corresponding virtualmodule.

Manner 6: The electronic device associates any product identifier withicon information of one icon and stores any product identifier and iconinformation of one icon, and displays, on at least one correspondingvirtual module, the icon indicated by the icon information.

The icon information may be any piece of information for uniquelyindicating one icon. The icon information is not limited in thisembodiment of this application.

Taking Table 2 as an example, when the electronic device reads a productidentifier XXXXXXXX in the fifth row in Table 2, the electronic deviceassociates the product identifier XXXXXXXX and icon information 1 andstores the product identifier XXXXXXXX and icon information 1. Theelectronic device stores, on a corresponding virtual module in theelectronic layout, an icon 1 indicated by the icon information 1.

After the electronic device completes reading of at least one piece ofdata in the result list, it means that the electronic device completesadding of at least one corresponding virtual module to the template ofthe electronic layout, and completes binding of at least one productidentifier in the result list to a corresponding virtual module. In thiscase, the electronic layout obtains a template of a current electroniclayout as the electronic layout.

For example, in FIG. 10 and FIG. 7 , after the electronic devicecompletes identification of a target picture 1 in FIG. 7 , a result listX may be obtained. The electronic device may obtain an electronic layout1 based on position information and a product identifier in the resultlist X. Each icon in the electronic layout 1 is bound to one productidentifier, and each icon is further displayed on one virtual module. Itcan be learned that a converter is mounted below a photovoltaic modulecorresponding to the virtual module. In FIG. 10 a and FIG. 7 a , afterthe electronic device completes identification of a target picture 1 ain FIG. 10 a , a result list X may be obtained. The electronic devicemay obtain an electronic layout 1 a based on position information and aproduct identifier in the result list X. Each icon in the electroniclayout 1 a is bound to one product identifier, and each icon is furtherdisplayed on one virtual module. It can be learned that a converter ismounted below a photovoltaic module corresponding to the virtual module.

For another example, in FIG. 11 and FIG. 8 , FIG. 11 is a schematicdiagram of obtaining an electronic layout applied to a photovoltaicarray according to an embodiment of this application. After theelectronic device completes identification of a target picture 2 in FIG.8 , a result list Y may be obtained. The electronic device may obtain anelectronic layout 2 based on position information and a productidentifier in the result list Y. Each icon in the electronic layout 2 isbound to one product identifier, and each icon is further displayed ontwo virtual modules. For example, the icon is displayed on virtualmodules 1 and 2. It can be learned that converters are mounted below twophotovoltaic modules corresponding to the virtual modules 1 and 2. InFIG. 11 a and FIG. 8 a , FIG. 11 a is a schematic diagram of obtainingan electronic layout applied to a photovoltaic array according to anembodiment of this application. After the electronic device completesidentification of a target picture 2 a in FIG. 8 a , a result list Y maybe obtained. The electronic device may obtain an electronic layout 2 abased on position information and a product identifier in the resultlist Y. Each icon in the electronic layout 2 a is bound to one productidentifier, and each icon is further displayed on two virtual modules.For example, the icon is displayed on virtual modules 1 a and 2 a. Itcan be learned that converters are mounted below two photovoltaicmodules corresponding to the virtual modules 1 a and 2 a.

For another example, in FIG. 12 and FIG. 9 , FIG. 12 is a schematicdiagram of obtaining an electronic layout applied to a photovoltaicarray according to an embodiment of this application. After theelectronic device completes identification of a target picture 3 in FIG.9 , a result list Z may be obtained. The electronic device may obtain anelectronic layout 3 based on position information and a productidentifier in the result list Z. Each first area in FIG. 9 maycorrespond to two virtual modules, each icon in the electronic layout 3is bound to one product identifier, and each icon is further displayedon one virtual module. For example, the icon is displayed on a virtualmodule 3. It can be learned that a converter is mounted below aphotovoltaic module corresponding to the virtual module 3. In FIG. 12 aand FIG. 9 a , FIG. 12 a is a schematic diagram of obtaining anelectronic layout applied to a photovoltaic array according to anembodiment of this application. After the electronic device completesidentification of a target picture 3 a in FIG. 9 a , a result list Z maybe obtained. The electronic device may obtain an electronic layout 3 abased on position information and a product identifier in the resultlist Z. Each first area in FIG. 9 a may correspond to two virtualmodules, each icon in the electronic layout 3 a is bound to one productidentifier, and each icon is further displayed on one virtual module.For example, the icon is displayed on a virtual module 3 a. It can belearned that a converter is mounted below a photovoltaic modulecorresponding to the virtual module 3 a.

The electronic device obtains the electronic layout based on the resultlist. Alternatively, for example, in the process 2 described above, theelectronic device may obtain the electronic layout based on a real-timeidentification result. For a further description of the process shown inthe process 2, refer to FIG. 14 . FIG. 14 is a flowchart of a method forobtaining an electronic layout applied to a photovoltaic array accordingto an embodiment of this application. The method includes the followingoperations.

Operation 3031: When the electronic device obtains position informationof at least one photovoltaic module in one first area, the electronicdevice adds at least one virtual module to a template of the electroniclayout of the photovoltaic array, where the virtual module correspondsto one photovoltaic module in the photovoltaic array.

After identifying any first area in the target picture, the electronicdevice obtains position information of at least one photovoltaic modulein the first area. The electronic device may directly perform operation3031 based on obtained position information of the first area.

Certainly, the electronic device may perform operation 3031 when theelectronic device obtains position information of all photovoltaicmodules in one first area.

Operation 3032: When the electronic device obtains any module identifierthat is in the first area and that is a first-type module identifier,the electronic device parses the module identifier to obtain a productidentifier.

After identifying any preset position in any first area in the targetpicture, the electronic device obtains a module identifier in the firstarea. When the module identifier is a first-type module identifier, theelectronic device performs operation 3032.

Operation 3033: The electronic device binds the product identifier tothe at least one virtual module corresponding to the at least onephotovoltaic module in the first area, to obtain the electronic layoutof the photovoltaic array.

After the electronic device completes identification of at least onefirst area in the target picture, it means that the electronic devicecompletes adding of at least one corresponding virtual module to thetemplate of the electronic layout, and completes binding of at least oneproduct identifier to a corresponding virtual module. In this case, theelectronic layout obtains a template of a current electronic layout asthe electronic layout.

Based on the processes shown in FIG. 13 and FIG. 14 , it can be learnedthat the electronic device may directly generate the electronic layoutbased on the position information and the module identifier of the atleast one photovoltaic module in the identified first area withoutmanual intervention, thereby reducing labor time consumption andimproving efficiency of generating the electronic layout.

304. The electronic device stores the electronic layout of thephotovoltaic array in a plurality of devices in a photovoltaic powergeneration system, where the plurality of devices in the photovoltaicpower generation system support data synchronization and backup.

The plurality of devices in the photovoltaic power generation systeminclude a converter, an inverter, a network management device, and thelike. The electronic device may store the electronic layout of thephotovoltaic array in any one of the devices by using a wired network ora wireless network. When the photovoltaic power generation system raisesa converter failure alarm, the skilled person may connect the networkmanagement device or a mobile phone to the inverter, so that the mobilephone can read the electronic layout of the photovoltaic array from theinverter, and display the electronic layout on a user interface. In thisway, the skilled person may determine, from the electronic layout basedon a product identifier of the faulty converter reported in thephotovoltaic power generation system, a virtual module bound to theproduct identifier. Because each virtual module corresponds to onephotovoltaic module in the photovoltaic array, the skilled person maydetermine a mounting position of the faulty converter.

When any of the devices that store the electronic layout fails, theskilled person may replace the faulty device with a new device. Becausethe plurality of devices that store the electronic layout all supportdata synchronization and backup, the new device may synchronize theelectronic layout from another device that stores the electronic layout,thereby avoiding a loss of the electronic layout.

FIG. 15 is a schematic diagram of an application scenario according toan embodiment of this application. An inverter in FIG. 15 may beconnected to an electronic device and a network management device byusing a wireless network. The electronic device may import an electroniclayout into the inverter and the network management device by using thewireless network, and the inverter may import the electronic layoutimported by the electronic device into a converter. When the inverterfails and is replaced by a new inverter, the new inverter maysynchronize the electronic layout from the converter or the networkmanagement device, so that the electronic layout in the inverter can bedirectly displayed on another electronic device.

In this embodiment of this application, the electronic device identifieseach first area in the target picture to obtain the position informationand the module identifier of the at least one photovoltaic module ineach first area, and may directly obtain the electronic layout based onthe position information and the module identifier of each photovoltaicmodule. In this way, a product identifier of each converter does notneed to be manually obtained, and a photovoltaic module does not need tobe manually added to the electronic layout, thereby reducing labor timeconsumption and improving efficiency of obtaining the electronic layout.In addition, the electronic device may first identify a moduleidentifier in the target picture, and then identify a first area inwhich the module identifier is located, to obtain position informationof at least one photovoltaic module in the first area. Therefore,identification on a first area having no module identifier can beavoided, thereby improving efficiency of identifying the target pictureby the electronic device. Moreover, when the electronic device storesinformation about a first area having a module identifier in the resultlist, efficiency of generating the result list can be improved andmemory consumption of the electronic device can be reduced. Furthermore,the electronic layout obtained by the electronic device may be stored inthe plurality of devices in the photovoltaic power generation system,and the plurality of devices can support data synchronization andbackup, thereby avoiding a loss of the electronic layout.

FIG. 16 is a schematic diagram of an apparatus for obtaining anelectronic layout applied to a photovoltaic array according to anembodiment of this application. The apparatus includes:

-   -   a first obtaining module 1601, configured to perform operation        301;    -   an identification module 1602, configured to perform operation        302; and    -   a second obtaining module 1603, configured to perform operation        303.

In an embodiment, the identification module 1602 is configured toperform operations 302A to 302C.

In an embodiment, the second obtaining module 1603 includes:

-   -   an obtaining unit, configured to obtain a result list based on        the position information and the module identifier of the at        least one photovoltaic module in each first area;    -   an adding unit, configured to perform operation 303E; and    -   a binding unit, configured to perform operation 303F.

In an embodiment, the obtaining unit is configured to perform operations303A to 303D.

In an embodiment, the second obtaining module 1603 is configured toperform operations 3031 to 3033.

In an embodiment, the first obtaining module is configured to:

-   -   obtain the target picture by photographing or scanning a paper        layout, where the paper layout includes at least one area, and        at least one module identifier is marked in each area.

In an embodiment, the apparatus further includes:

-   -   a storage module, configured to perform operation 304.

At least one of the foregoing optional technical solutions may berandomly combined to form optional embodiments of the presentdisclosure, and details are not described herein again.

It should be noted that when the apparatus for obtaining an electroniclayout applied to a photovoltaic array provided in the foregoingembodiment obtains an electronic layout of a photovoltaic array,division of the foregoing function modules is merely used as an examplefor description. In actual application, the foregoing functions may beallocated to different function modules for implementation as required,that is, an inner structure of the apparatus is divided into differentfunction modules to implement all or some of the functions describedabove. In addition, the apparatus for obtaining an electronic layoutapplied to a photovoltaic array provided in the foregoing embodiment andthe embodiment of the method for obtaining an electronic layout appliedto a photovoltaic array pertain to a same concept. For a specificimplementation process of the apparatus, refer to the method embodiment.Details are not described herein again.

A person of ordinary skill in the art may understand that all or some ofthe operations of the embodiments may be implemented by hardware or aprogram instructing related hardware. The program may be stored in acomputer readable storage medium. The storage medium may be a read-onlymemory, a magnetic disk, or an optical disc.

The foregoing descriptions are merely example embodiments of thisapplication, but are not intended to limit this application. Anymodification, equivalent replacement, or improvement made withoutdeparting from the spirit and principle of this application should fallwithin the protection scope of this application.

What is claimed is:
 1. A method of obtaining an electronic layout of aphotovoltaic array for an electronic device, comprising: obtaining, bythe electronic device, a target picture, wherein the target picturecomprises a first area indicating position information and a moduleidentifier of a photovoltaic module in the photovoltaic array, whereinthe position information indicates a position of the photovoltaic modulein the photovoltaic array, wherein the module identifier is a first-typemodule identifier or a second-type module identifier, wherein thefirst-type module identifier indicates that a converter is mounted belowthe photovoltaic module, and wherein the second-type module identifierindicates that no converter is mounted below the photovoltaic module;identifying, by the electronic device, the first area in the targetpicture to obtain the position information and the module identifier ofthe photovoltaic module in the first area; and obtaining, by theelectronic device, the electronic layout of the photovoltaic array basedon the position information and the module identifier of thephotovoltaic module in the first area, wherein, when the positioninformation of the photovoltaic module in the first area is obtained,adding, by the electronic device, a virtual module to a template of theelectronic layout of the photovoltaic array, wherein the virtual modulecorresponds to the photovoltaic module in the photovoltaic array.
 2. Themethod according to claim 1, wherein the identifying, by the electronicdevice, the first area in the target picture to obtain the positioninformation and the module identifier of the photovoltaic module in thefirst area comprises: detecting, by the electronic device, a position ofthe first area in the target picture to obtain coordinate information ofthe photovoltaic module in the first area in the target picture; using,by the electronic device, the coordinate information of the photovoltaicmodule in the first area as the position information of the photovoltaicmodule in the first area; and performing, by the electronic device,identification at a preset position of the photovoltaic module in thefirst area to obtain the module identifier of the photovoltaic module inthe first area.
 3. The method according to claim 1, wherein theobtaining, by the electronic device, the electronic layout of thephotovoltaic array based on the position information and the moduleidentifier of the photovoltaic module in the first area comprises:obtaining, by the electronic device, a result list based on the positioninformation and the module identifier of the photovoltaic module in thefirst area; adding, by the electronic device, the virtual module at acorresponding position in the template of the electronic layout based oneach piece of position information in the result list, wherein thevirtual module corresponds to the photovoltaic module in thephotovoltaic array; and binding, by the electronic device, each productidentifier in the result list to a corresponding virtual module in thetemplate of the electronic layout to obtain the electronic layout of thephotovoltaic array.
 4. The method according to claim 3, wherein theobtaining, by the electronic device, a result list based on the positioninformation and the module identifier of the photovoltaic module in thefirst area comprises: when the module identifier of the photovoltaicmodule in the first area is a first-type module identifier, parsing, bythe electronic device, the module identifier to obtain a productidentifier indicated by the module identifier; associating, by theelectronic device, the product identifier with the position informationof the photovoltaic module in the first area and storing the productidentifier and the position information of the photovoltaic module inthe first area in the result list; and when the module identifier of thephotovoltaic module in the first area is a second-type moduleidentifier, outputting, by the electronic device, a null identifier;associating, by the electronic device, the null identifier with positioninformation of the photovoltaic module and storing the null identifierand the position information of the photovoltaic module in the resultlist.
 5. The method according to claim 1, wherein the obtaining, by theelectronic device, the electronic layout of the photovoltaic array basedon the position information and the module identifier of thephotovoltaic module in the first area comprises: when the moduleidentifier is a first-type module identifier, parsing, by the electronicdevice, the module identifier to obtain a product identifier; andbinding, by the electronic device, the product identifier to the virtualmodule corresponding to the photovoltaic module in the first area, toobtain the electronic layout of the photovoltaic array.
 6. The methodaccording to claim 1, wherein the obtaining, by the electronic device,the target picture comprises: obtaining, by the electronic device, thetarget picture by photographing or scanning a paper layout, wherein thepaper layout comprises an area, wherein the area has a module identifierthat is marked.
 7. The method according to claim 1, wherein the methodfurther comprises: storing, by the electronic device, the electroniclayout of the photovoltaic array in a plurality of devices in aphotovoltaic power generation system, wherein the plurality of devicesin the photovoltaic power generation system support data synchronizationand backup.
 8. An apparatus for obtaining an electronic layout for to aphotovoltaic array, comprising: a processor; a memory coupled to theprocessor and storing program instructions, which, when executed by theprocessor, cause the processor to perform operations comprising:obtaining a target picture that includes a first area indicatingposition information and a module identifier of a photovoltaic module inthe photovoltaic array, wherein the position information indicates aposition of the photovoltaic module in the photovoltaic array, whereinthe module identifier is a first-type module identifier or a second-typemodule identifier, wherein the first-type module identifier indicatesthat a converter is mounted below the photovoltaic module, and whereinthe second-type module identifier indicates that no converter is mountedbelow the photovoltaic module, identifying the first area in the targetpicture to the obtain position information and the module identifier ofthe photovoltaic module in the first area, and obtaining the electroniclayout of the photovoltaic array based on the position information andthe module identifier of the photovoltaic module in the first area,wherein, when the position information of the photovoltaic module in thefirst area is obtained, adding a virtual module to a template of theelectronic layout of the photovoltaic array, wherein the virtual modulecorresponds to the photovoltaic module in the photovoltaic array.
 9. Theapparatus according to claim 8, the operations further comprising:detecting a position of the first area in the target picture to obtaincoordinate information of the photovoltaic module in the first area inthe target picture; using the coordinate information of the photovoltaicmodule in the first area as the position information of the photovoltaicmodule in the first area; and performing identification at a presetposition of the photovoltaic module in the first area to obtain themodule identifier of the photovoltaic module in the first area.
 10. Theapparatus according to claim 8, the operations further comprising:obtaining a result list based on the position information and the moduleidentifier of the photovoltaic module in the first area; adding thevirtual module at a corresponding position in the template of theelectronic layout based on each piece of position information in theresult list, wherein the virtual module corresponds to a photovoltaicmodule in the photovoltaic array; and binding each product identifier inthe result list to a corresponding virtual module in the template of theelectronic layout to obtain the electronic layout of the photovoltaicarray.
 11. The apparatus according to claim 10, the operations furthercomprising: when the module identifier in the first area is a first-typemodule identifier, parsing the module identifier to obtain a productidentifier indicated by the module identifier; associate the productidentifier with the position information of the photovoltaic module inthe first area and store the product identifier and the positioninformation of the photovoltaic module in the first area in the resultlist; and when the module identifier of the photovoltaic module in theany first area is a second-type module identifier, outputting a nullidentifier; associating the null identifier with position information ofthe photovoltaic module and store the null identifier and the positioninformation of the photovoltaic module in the result list.
 12. Theapparatus according to claim 8, the operations further comprising: whenthe module identifier is a first-type module identifier, parsing themodule identifier to obtain a product identifier; and binding theproduct identifier to the virtual module corresponding to thephotovoltaic module in the first area, to obtain the electronic layoutof the photovoltaic array.
 13. The apparatus according to claim 8, theoperations further comprising: obtaining the target picture byphotographing or scanning a paper layout, wherein the paper layoutcomprises an area, wherein the area has a module identifier that ismarked.
 14. The apparatus according to claim 8, the operations furthercomprising: storing the electronic layout of the photovoltaic array in aplurality of devices in a photovoltaic power generation system, whereinthe plurality of devices in the photovoltaic power generation systemsupport data synchronization and backup.
 15. A system for obtaining anelectronic layout for a photovoltaic array, comprising: a photovoltaicmodule; a converter; and an electronic device; and wherein theelectronic device is configured to: obtain a target picture, wherein thetarget picture comprises a first area, and the first area indicatingposition information and a module identifier of a photovoltaic module inthe photovoltaic array, wherein the position information indicates aposition of the photovoltaic module in the photovoltaic array, whereinthe module identifier is a first-type module identifier or a second-typemodule identifier, wherein the first-type module identifier indicatesthat a converter is mounted below the photovoltaic module, wherein thesecond-type module identifier indicates that no converter is mountedbelow the photovoltaic module; identify the first area in the targetpicture to obtain position information and a module identifier of thephotovoltaic module in the first area; and generate, by the electronicdevice, the electronic layout of the photovoltaic array based on theposition information and the module identifier of the photovoltaicmodule in the first area, comprising adding a virtual module to atemplate of the electronic layout of the photovoltaic array, wherein thevirtual module corresponds to the photovoltaic module in thephotovoltaic array.
 16. The system according to claim 15, wherein theelectronic device is configured to: detect a position of the first areain the target picture to obtain coordinate information of thephotovoltaic module in the first area in the target picture; use thecoordinate information of the photovoltaic module in the first area asthe position information of the one photovoltaic module in the firstarea; and perform identification at a preset position of thephotovoltaic module in the first area to obtain the module identifier inthe first area.
 17. The system according to claim 15, wherein theelectronic device is configured to: obtain a result list based on theposition information and the module identifier of the photovoltaicmodule in the first area; add the virtual module at a correspondingposition in the template of the electronic layout based on each piece ofposition information in the result list, wherein the virtual modulecorresponds to the photovoltaic module in the photovoltaic array; andbind each product identifier in the result list to a correspondingvirtual module in the template of the electronic layout to obtain theelectronic layout of the photovoltaic array.
 18. The system according toclaim 15, wherein the electronic device is configured to: when themodule identifier is a first-type module identifier, parse the moduleidentifier to obtain a product identifier; and bind the productidentifier to the virtual module corresponding to the photovoltaicmodule in the first area, to obtain the electronic layout of thephotovoltaic array.
 19. The system according to claim 15, wherein theelectronic device is configured to obtain the target picture byphotographing or scanning a paper layout, wherein the paper layoutcomprises an area, wherein the area has a module identifier that ismarked.
 20. The system according to claim 15, wherein the electronicdevice is configured to store the electronic layout of the photovoltaicarray in a plurality of devices in a photovoltaic power generationsystem, wherein the plurality of devices in the photovoltaic powergeneration system support data synchronization and backup.